#! /bin/sh

LIB=$1

if [ -d /usr/include/MGPI ]; then
	if [ -e /usr/include/MGPI/mgpi.h ]; then
		sudo rm -f /usr/include/MGPI/mgpi.h
	fi
	sudo rmdir /usr/include/MGPI
fi

if[ -e /usr/lib/$LIB ]; then
    sudo rm -f /usr/lib/$LIB
    sudo rm -f /usr/lib/libMGPI.so
    sudo rm -f /usr/lib/libMGPI.a
    sudo rm -f /usr/lib/libMGPF.so
    sudo rm -f /usr/lib/libMGPF.a
fi

echo "Uninstall successful!"
